home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / e_to_l / imlib201 / u_p_size.pas < prev    next >
Pascal/Delphi Source File  |  1996-09-15  |  2KB  |  94 lines

  1. {Part of Imagelib VCL/DLL Library.
  2.  
  3. Written by Jan Dekkers and Kevin Adams}
  4.  
  5. unit U_p_size;
  6.  
  7. interface
  8.  
  9. uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
  10.   StdCtrls, ExtCtrls, Spin;
  11.  
  12. type
  13.   TPrintersize = class(TForm)
  14.     OKBtn: TBitBtn;
  15.     CancelBtn: TBitBtn;
  16.     Bevel1: TBevel;
  17.     WidthSpinEdit: TSpinEdit;
  18.     HeigthSpinEdit: TSpinEdit;
  19.     Label1: TLabel;
  20.     Label2: TLabel;
  21.     Label3: TLabel;
  22.     GroupBox1: TGroupBox;
  23.     RadioButton1: TRadioButton;
  24.     RadioButton2: TRadioButton;
  25.     RadioButton3: TRadioButton;
  26.     RadioButton4: TRadioButton;
  27.     RadioButton5: TRadioButton;
  28.     RadioButton6: TRadioButton;
  29.     procedure FormActivate(Sender: TObject);
  30.     procedure RadioButton1Click(Sender: TObject);
  31.     procedure RadioButton2Click(Sender: TObject);
  32.     procedure RadioButton3Click(Sender: TObject);
  33.     procedure RadioButton4Click(Sender: TObject);
  34.     procedure RadioButton5Click(Sender: TObject);
  35.     procedure RadioButton6Click(Sender: TObject);
  36.   private
  37.     { Private declarations }
  38.     bwt, bht : integer;
  39.   public
  40.     { Public declarations }
  41.   end;
  42.  
  43. var
  44.   Printersize: TPrintersize;
  45.  
  46. implementation
  47.  
  48. {$R *.DFM}
  49.  
  50. procedure TPrintersize.FormActivate(Sender: TObject);
  51. begin
  52.  bwt:= WidthSpinEdit.Value;
  53.  bht:=HeigthSpinEdit.Value;
  54. end;
  55.  
  56.  
  57. procedure TPrintersize.RadioButton1Click(Sender: TObject);
  58. begin
  59.  HeigthSpinEdit.Value:=bht;
  60.  WidthSpinEdit.Value:=bwt;
  61. end;
  62.  
  63. procedure TPrintersize.RadioButton2Click(Sender: TObject);
  64. begin
  65.  HeigthSpinEdit.Value:=bht*2;
  66.  WidthSpinEdit.Value:=bwt*2;
  67. end;
  68.  
  69. procedure TPrintersize.RadioButton3Click(Sender: TObject);
  70. begin
  71.  HeigthSpinEdit.Value:=bht*3;
  72.  WidthSpinEdit.Value:=bwt*3;
  73. end;
  74.  
  75. procedure TPrintersize.RadioButton4Click(Sender: TObject);
  76. begin
  77.  HeigthSpinEdit.Value:=bht*4;
  78.  WidthSpinEdit.Value:=bwt*4;
  79. end;
  80.  
  81. procedure TPrintersize.RadioButton5Click(Sender: TObject);
  82. begin
  83.  HeigthSpinEdit.Value:=bht*5;
  84.  WidthSpinEdit.Value:=bwt*5;
  85. end;
  86.  
  87. procedure TPrintersize.RadioButton6Click(Sender: TObject);
  88. begin
  89.  HeigthSpinEdit.Value:=bht*6;
  90.  WidthSpinEdit.Value:=bwt*6;
  91. end;
  92.  
  93. end.
  94.